package model.general;

import java.awt.Rectangle;
import java.io.Serializable;

public class Location implements Serializable {
	protected static final long serialVersionUID = -2215190743590612933L;

	private int x, y;

	public Location(int x, int y) {
		super();
		this.x = x;
		this.y = y;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public Rectangle getBounds(int width, int height) {
		return new Rectangle(x, y, width, height);
	}

	public void increaseX(int distance) {
		x += distance;
	}

	public void decreaseX(int distance) {
		x -= distance;
	}

	public void increaseY(int distance) {
		y += distance;
	}

	public void decreaseY(int distance) {
		y -= distance;
	}

	@Override
	public String toString() {
		return "Location[" + x + ", " + y + "]";
	}

}
